package com.xxgc.eow.service.impl;

import com.xxgc.eow.entity.Postskill;
import com.xxgc.eow.mapper.PostskillMapper;
import com.xxgc.eow.service.IPostskillService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 职位技能表 服务实现类
 * </p>
 *
 * @author Mr.Abel
 * @since 2023-05-23
 */
@Service
public class PostskillServiceImpl extends ServiceImpl<PostskillMapper, Postskill> implements IPostskillService {

    @Resource
    private PostskillMapper postskillMapper;
    @Override
    public int addPostSkill(Postskill postskill) {
        return postskillMapper.insert(postskill);
    }

    @Override
    public int delPostSkill(Postskill postskill) {
        return postskillMapper.delectPostSkill(postskill);
    }

    @Override
    public int updatPostSkill(Postskill postskill, int oldSkillId) {
        return postskillMapper.updatPostSkill(postskill,oldSkillId);
    }

    @Override
    public List<Postskill> getALlByPostId(int postId) {
        return postskillMapper.selectBypostId(postId);
    }

    @Override
    public List<Postskill> getALl() {
        return postskillMapper.selectAll();
    }
}
